//
//  FeelingEditCollectionViewCell.swift
//  MoodDiary
//
//  Created by TanJian on 2021/12/18.
//

import UIKit

protocol FeelingEditCollectionViewCellDelegate: AnyObject {
    func deleteCellAtIndexPath(indexPath: IndexPath)
}

class FeelingEditCollectionViewCell: UICollectionViewCell {
    
    @IBOutlet weak var whiteBgView: UIView!
    @IBOutlet weak var imgView: UIImageView!
    @IBOutlet weak var infoLabel: UILabel!
    @IBOutlet weak var deleteBtn: UIButton!
    
    weak var feelingDelegate:FeelingEditCollectionViewCellDelegate?
    var indexPath:IndexPath!
    
    
    override func awakeFromNib() {
        super.awakeFromNib()
        
        whiteBgView.layer.borderColor = UIColor.hexColor(hex: "#E8E8E8").cgColor
        
    }
    @IBAction func btnClickAction(_ sender: Any) {
        
        if let delegate = feelingDelegate{
            delegate.deleteCellAtIndexPath(indexPath: indexPath)
        }
            
        NSLog("点击删除按钮")
    }
    
}
